
import networkx as nx
from feature_data.Graph_Cluster_class import Graph_Paper_Cluster

def get_many_idx_paper_cluster_list(cluster_list, paper_title_dict, paper_org_dict):
    # many_idx_list = self.get_many_idx_list(self.first_cluster_list)
    many_idx_list = get_many_idx_list(cluster_list)

    many_idx_graph_paper_cluster_list = []
    for idx_list in many_idx_list:
        # paper_cluster = Graph_Paper_Cluster(idx_list, paper_title_dict)
        paper_cluster = Graph_Paper_Cluster(idx_list, paper_title_dict, paper_org_dict)

        many_idx_graph_paper_cluster_list.append(paper_cluster)
    return many_idx_graph_paper_cluster_list

def get_many_node_paper_cluster_list(cluster_graph, paper_title_dict, paper_org_dict):
    subgraph_nodes_list = _subgraph_nodes_list(cluster_graph)
    # many_idx_graph_paper_cluster_list= get_many_idx_paper_cluster_list(subgraph_nodes_list, paper_title_dict)
    many_idx_graph_paper_cluster_list= get_many_idx_paper_cluster_list(subgraph_nodes_list, paper_title_dict, paper_org_dict)
    return many_idx_graph_paper_cluster_list